size request: Avoid unnecessary reffing
authorMatthias Clasen <mclasen@redhat.com>
Sun, 20 Sep 2015 04:55:23 +0000 (00:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Sep 2015 11:01:16 +0000 (07:01 -0400)
There is no particular reason why we should have to ref the
widgets if they are in a size group - we are not reffing them
in the simple case either.

gtk/gtksizerequest.c

index 058f01f470d3f8f5533b95a451417e50c94f2125..393af7c72bcbd97d4441ac69c6c21a7096612d4b 100644 (file)
@@ -393,8 +393,6 @@ gtk_widget_compute_size_for_orientation (GtkWidget        *widget,
 
   widgets = _gtk_size_group_get_widget_peers (widget, orientation);
 
-  g_hash_table_foreach (widgets, (GHFunc) g_object_ref, NULL);
-  
   g_hash_table_iter_init (&iter, widgets);
   while (g_hash_table_iter_next (&iter, &key, NULL))
     {
@@ -407,8 +405,6 @@ gtk_widget_compute_size_for_orientation (GtkWidget        *widget,
       nat_result = MAX (nat_result, nat_dimension);
     }
 
-  g_hash_table_foreach (widgets, (GHFunc) g_object_unref, NULL);
-
   g_hash_table_destroy (widgets);
 
   /* Baselines make no sense with sizegroups really */